﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace CommonLib
{
    [Serializable]
    public class User
    {
        private string name;
        private IPAddress ip;
        private int port;
        private string status;

        public User()
        {
        }
        public User(string newName, IPAddress newIp, int newPort)
        {
            this.name = newName;
            this.ip = newIp;
            this.port = newPort;
            this.status = "activo";
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public IPAddress Ip
        {
            get
            {
                return this.ip;
            }
            set
            {
                this.ip = value;
            }
        }

        public int Port
        {
            get
            {
                return this.port;
            }
            set
            {
                this.port = value;
            }
        }

        public string Status
        {
            get
            {
                return this.status;
            }
            set
            {
                this.status = value;
            }
        }

        public string getAddress()
        {
            return this.Ip.ToString() + ":" + this.Port;
        }
    }
}
